/**
 * 路由表
 */
define('appRoutes', ['resolveComponent'], function (resolveComponent) {
  var routerTable = [
    {
      name: 'login',
      path: '/login',
      component: () => resolveComponent('view/login/login'),
      meta: {
        hideInMenu: true
      }
    },
    {
      name: 'main',
      path: '/',
      redirect: '/home/index',
      meta: {
        hideInMenu: true
      }
    },
    {
      name: 'home',
      path: '/home',
      redirect: '/home/index',
      meta: {
        title: '首页',
        icon: 'md-construct'
      },
      component: () => resolveComponent('view/main'),
      children: [{
        path: 'index',
        name: '/home/index',
        meta: {
          title: '首页',
          icon: 'md-construct',
          homepage: true
        },
        component: () => resolveComponent('view/index')
      }, {
        path: 'index2',
        name: '/home/index2',
        meta: {
          title: 'demo',
          icon: 'md-apps'
        },
        component: () => resolveComponent('view/index')
      }]
    }, {
      name: 'demo',
      path: '/demo',
      meta: {
        title: 'demo',
        icon: 'md-apps'
      },
      component: () => resolveComponent('view/main'),
      children: [{
        path: 'index',
        name: '/demo/index',
        meta: {
          title: 'demo',
          icon: 'md-apps'
        },
        component: () => resolveComponent('view/demo/index')
      }, {
        path: 'index2',
        name: '/demo/index2',
        meta: {
          title: 'demo',
          icon: 'md-apps'
        },
        component: () => resolveComponent('view/demo/index')
      }]
    },
    {
      path: '*',
      name: 'error_404',
      meta: {
        hideInMenu: true
      },
      component: () => resolveComponent('view/error/404')
    }
  ]
  return routerTable
})
